訪客管理API
獲取訪客臨時密碼列表
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 項目ID |
| page_size | Integer | Body | 是 | 每頁數量 |
| page_index | Integer | Body | 是 | 當前頁數 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| visitor_temp_key_id | String | Body | 訪客臨時密碼ID |
| visitor_temp_key_name | String | Body | 訪客臨時密碼名稱 |
| visitor_temp_key_number | String | Body | 訪客臨時密碼號碼 |
| qr_code_url | String | Body | 二維碼地址 |
| device_validity_count | String | Body | 設備有效次數 |
| visitor_identity_number | String | Body | 訪客身份號碼 |
| repeat_mode | String | Body | 重複模式 never:從不 daily:每日 weekly:每週 |
| available_days | []String | Body | 可用時間 |
| start_time | String | Body | 開始時間,UTC |
| finish_time | String | Body | 結束時間,UTC |
| created_time | String | Body | 創建時間,UTC |
| creator | String | Body | 創建人 |
請求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_visitor_temp_key_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1,
"project_id": "pr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"visitor_temp_key_id": "vr2c4b070cc928496198944858b344fc6",
"visitor_temp_key_name": "test",
"visitor_temp_key_number": "93014275",
"qr_code_url": "https://test.akubela.com/a.png",
"device_validity_count": "",
"visitor_identity_number": "123456",
"repeat_mode": "weekly",
"available_days": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
],
"start_time": "13:14:00",
"finish_time": "15:14:00",
"created_time": "2024-01-25 21:10:16",
"creator": "pm"
}
]
}
失敗返回示例
見 接口失敗返回
獲取訪客臨時密碼信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 項目ID |
| visitor_temp_key_id | String | Body | 是 | 訪客臨時密碼ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| visitor_temp_key_name | String | Body | 訪客臨時密碼名稱 |
| visitor_temp_key_number | String | Body | 訪客臨時密碼號碼 |
| qr_code_url | String | Body | 二維碼地址 |
| device_validity_count | String | Body | 設備有效次數 |
| visitor_identity_number | String | Body | 訪客身份號碼 |
| residence_id | String | Body | 住宅ID |
| family_name | String | Body | 家庭名稱 |
| residence_no | String | Body | 住宅號碼 |
| building_id | String | Body | 樓棟ID |
| building_name | String | Body | 樓棟名稱 |
| repeat_mode | String | Body | 重複模式 never:從不 daily:每日 weekly:每週 |
| available_days | []String | Body | 可用時間 |
| start_time | String | Body | 開始時間,UTC |
| finish_time | String | Body | 結束時間,UTC |
| created_time | String | Body | 創建時間,UTC |
| creator | String | Body | 創建人 |
| devices | []Object<device> | Body | 設備信息 |
device說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| building_id | String | Body | 樓棟ID |
| building_name | String | Body | 樓棟名稱 |
| device_id | String | Body | 設備ID |
| device_name | String | Body | 設備名稱 |
| mac | String | Body | MAC地址 |
| online | Boolean | Body | 判斷設備在離線狀態 true:在線 false:離線 |
| device_type | String | Body | 判斷設備類型 Multi-tenants Doorphone:梯口機 Single-tenant Doorphone:門口機 Indoor Monitor:室內機 Guard Phone:管理機 Access Control:門禁 |
| relays | []Object<relay> | Body | 門控信息 |
| security_relays | []Object<relay> | Body | 安全門控信息 |
relay說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| relay_name | String | Body | 門控名稱 |
| relay_number | String | Body | 門控撥號鍵值 |
| relay_id | String | Body | 門控ID |
請求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_visitor_temp_key_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"visitor_temp_key_id": "vr2c4b070cc928496198944858b344fc6",
"project_id": "pr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"visitor_temp_key_name": "test",
"visitor_temp_key_number": "93014275",
"qr_code_url": "https://test.akubela.com/a.png",
"device_validity_count": "",
"visitor_identity_number": "123456",
"residence_id": "r2c4b070cc928496198944858b344fc68",
"family_name": "test",
"residence_no": "101",
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"building_name": "AB01",
"repeat_mode": "weekly",
"available_days": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
],
"start_time": "13:14:00",
"finish_time": "15:14:00",
"created_time": "2024-01-25 21:10:16",
"creator": "pm",
"devices": [
{
"device_id": "d28b494e5babb46b288f4baf7fe322cc4",
"device_name": "test",
"mac": "C10519082089",
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"building_name": "AB01",
"online": true,
"device_type": "Multi-tenants Doorphone",
"security_relays": [],
"relays": [
{
"relay_name": "Front Door 3",
"relay_number": "#",
"relay_id": "r4b5a73f8dd84abaa94dcs248be49b0d2"
}
]
}
]
}
]
}
失敗返回示例
見 接口失敗返回
獲取訪客臨時密碼設備列表
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 項目ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| building_id | String | Body | 樓棟ID |
| building_name | String | Body | 樓棟名稱 |
| device_id | String | Body | 設備ID |
| device_name | String | Body | 設備名稱 |
| mac | String | Body | MAC地址 |
| online | Boolean | Body | 判斷設備在離線狀態 true:在線 false:離線 |
| device_type | String | Body | 判斷設備類型 Multi-tenants Doorphone:梯口機 Single-tenant Doorphone:門口機 Indoor Monitor:室內機 Guard Phone:管理機 Access Control:門禁 |
| relays | []Object<relay> | Body | 門控信息 |
| security_relays | []Object<relay> | Body | 安全門控信息 |
relay說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| relay_name | String | Body | 門控名稱 |
| relay_number | String | Body | 門控撥號鍵值 |
| relay_id | String | Body | 門控ID |
請求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_visitor_temp_key_device_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "pr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"device_id": "d28b494e5babb46b288f4baf7fe322cc4",
"device_name": "test",
"mac": "C10519082089",
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"building_name": "AB01",
"online": true,
"device_type": "Multi-tenants Doorphone",
"security_relays": [],
"relays": [
{
"relay_name": "Front Door 3",
"relay_number": "#",
"relay_id": "r4b5a73f8dd84abaa94dcs248be49b0d2"
}
]
}
]
}
失敗返回示例
見 接口失敗返回
創建訪客臨時密碼信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 項目ID |
| visitor_temp_key_name | String | Body | 是 | 訪客臨時密碼名稱 |
| device_validity_count | String | Body | 否 | 設備有效次數 |
| visitor_identity_number | String | Body | 否 | 訪客身份號碼 |
| notice_email | String | Body | 否 | 通知郵箱 |
| residence_id | String | Body | 是 | 住宅ID |
| family_name | String | Body | 是 | 家庭名稱 |
| residence_no | String | Body | 是 | 住宅號碼 |
| building_id | String | Body | 是 | 樓棟ID |
| building_name | String | Body | 是 | 樓棟名稱 |
| repeat_mode | String | Body | 是 | 重複模式 never:從不 daily:每日 weekly:每週 |
| available_days | []String | Body | 否 | 可用時間 |
| start_time | String | Body | 是 | 開始時間,UTC |
| finish_time | String | Body | 是 | 結束時間,UTC |
| devices | []Object<device> | Body | 是 | 設備信息 |
device說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| building_id | String | Body | 是 | 樓棟ID |
| device_id | String | Body | 是 | 設備ID |
| mac | String | Body | 是 | MAC地址 |
| relays | []Object<relay> | Body | 是 | 門控信息 |
| security_relays | []Object<relay> | Body | 是 | 安全門控信息 |
relay說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| relay_id | String | Body | 是 | 門控ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| visitor_temp_key_id | String | Body | 訪客臨時密碼ID |
請求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_visitor_temp_key_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"visitor_temp_key_name": "test",
"device_validity_count": "",
"visitor_identity_number": "123456",
"notice_email": "test@akubela.com",
"residence_id": "r2c4b070cc928496198944858b344fc68",
"family_name": "test",
"residence_no": "101",
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"building_name": "AB01",
"repeat_mode": "weekly",
"available_days": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
],
"start_time": "13:14:00",
"finish_time": "15:14:00",
"devices": [
{
"device_id": "d28b494e5babb46b288f4baf7fe322cc4",
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"mac": "C10519082081",
"security_relays": [],
"relays": [
{
"relay_id": "r4b5a73f8dd84abaa94dcs248be49b0d2"
}
]
}
]
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"visitor_temp_key_id": "v2a621c1ae77040d697bd2134700f57ea"
}
}
失敗返回示例
見 接口失敗返回
刪除訪客臨時密碼信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 項目ID |
| visitor_temp_key_id | String | Body | 是 | 訪客臨時密碼ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_visitor_temp_key_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"visitor_temp_key_id": "vrbr2c4b070cc928496198944858b344f"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
獲取訪客臨時密碼歷史記錄
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 項目ID |
| page_size | Integer | Body | 是 | 每頁數量 |
| page_index | Integer | Body | 是 | 當前頁數 |
| visitor_temp_key_id | String | Body | 是 | 訪客臨時密碼ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| open_door | Boolean | Body | 判斷開門是否成功 true:成功 false:失敗 |
| account_name | String | Body | 賬號名稱 |
| device_name | String | Body | 設備名稱 |
| capture_thumbnail_url | String | Body | 抓拍縮略圖地址 |
| open_door_type | String | Body | 開門類型 |
| capture_picture_url | String | Body | 抓拍圖地址 |
| open_door_time | String | Body | 開門時間 |
| residence_no | String | Body | 住宅號碼 |
| building_name | String | Body | 樓棟名稱 |
| record_type | String | Body | 記錄類型 |
| number | String | Body | 號碼 |
請求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_visitor_temp_key_history",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1,
"visitor_temp_key_id": "vr2c4b070cc928496198944858b344fc6",
"project_id": "pr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"open_door_time": "2020-05-18 15:25:45",
"building_name": "test",
"device_name": "device",
"account_name": "tom",
"residence_no": "121",
"record_type": "open door",
"open_door_type": "temp key",
"number": "12314134",
"open_door": true,
"capture_thumbnail_url": "https://test.akubela.com/r.jpg",
"capture_picture_url": "https://test.akubela.com/d.jpg"
}
]
}
失敗返回示例
見 接口失敗返回
批量刪除訪客臨時密碼信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 項目ID |
| visitor_temp_keys | []Object<visitor_temp_key> | Body | 是 | 訪客臨時密碼信息 |
visitor_temp_key說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| visitor_temp_key_id | String | Body | 是 | 訪客臨時密碼ID |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_visitor_temp_key_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p01adc223cc4b3bedb6bd4742dedcfa52",
"visitor_temp_keys": [
{
"visitor_temp_key_id": "v8b5a73f8dd84abaa94dcs248be49b0d1"
}
]
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回